﻿using QBZ.Evaluation.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace QBZ.Evaluation.Repositories.DataAccess
{
    [Table("tb_oAuth")]
    public partial class TbOAuth
    {
        [Key]
        public int OAuthId { get; set; }

        [MaxLength(100),Required]
        public string OpenId { get; set; }

        [MaxLength(100)]
        public string UnionId { get; set; }

        public OAuthWay OAuthWay  { get; set; }

        public int UserId { get; set; }

        [ForeignKey("UserId")]
        public  TbUser User { get; set; }

        [MaxLength(100),Required]
        public string Token { get; set; }

        [MaxLength(100), Required]
        public string NickName { get; set; }

        [MaxLength(100)]
        public string Sex { get; set; }

        [MaxLength(100)]
        public string Country { get; set; }

        [MaxLength(100)]
        public string Province { get; set; }

        [MaxLength(100)]
        public string City { get; set; }

        [MaxLength(30)]
        public string BirthDay { get; set; }

        [MaxLength(500)]
        public string FigureUrl { get; set; }

        [MaxLength(100)]
        public string Language { get; set; }

        public DateTime CreateOn { get; set; }

        public int CreateBy { get; set; }

        public DateTime? UpdateOn { get; set; }

        public int? UpdateBy { get; set; }

        [Timestamp]
        public byte[] TimeStamp { get; set; }

        public Guid Guid { get; set; }
    }
}
